<?php
/**
* Copyright 2009 Waag Society <http://www.waag.org>
* This file is part of Annotrax.
*
* Annotrax is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License,
* or (at your option) any later version.
*
* Annotrax is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Annotrax.
* If not, see http://www.gnu.org/licenses/gpl.html
*/

?>
<?php
/**
 * View file for /annotation/play
 */
?>
<div class="section">
	<div class="floatLeft">
		<em><?php echo $this->translate( "Currently watching" )?></em>
		<h1><em class="hilight">"<?php echo $this->movie->title ?>"</em></h1>
	</div>
	<div class="floatRight">
		<a class="active" href="<?php echo $this->url( array('action' => 'play', 'id' => $this->movie->id ), 'movie' ) ?>"><?php echo $this->translate("play movie") ?></a>
		&nbsp;
		<a href="<?php echo $this->url( array('action' => 'annotate', 'id' => $this->movie->id ), 'movie' ) ?>"><?php echo $this->translate("annotate movie") ?></a>
	</div>
</div>
<div id="movieSection" class="section">
	<?php echo $this->Player( $this->annotation->getMovieUri() ); ?>
	<div id="atAnnotationBrowser">
	<?php echo $this->annotationBrowser( $this->channels, $this->annotations ); ?>
	</div>
</div>
<div class="section">
	<div id="atAnnotationInfo">
		<h1>
			<?php echo $this->translate("Annotation #") . $this->annotation->id ?>
			<?php echo $this->translate('for movie') ?>
			<a href="<?php echo $this->url(array('action' => 'play', 'id' => $this->movie->id ), 'movie') ?>"><em><?php echo $this->movie->title ?></em></a>
		</h1>
		<div class="floatLeft">
			<img class="thumbnail" src="<?php echo $this->url( array('action' => 'thumbnail', 'id' => $this->movie->id, 'timecode' => $this->annotation->getStart(false)), 'frame' ) ?>" />
		</div>
		<div class="floatLeft">
			<strong><span class="duration"><?php echo $this->translate("duration") ?> <?php echo $this->annotation->getDuration() ?></strong>
			<strong><?php echo $this->annotation->getStart() ?></strong>
			<div class='htmlcontent'>
				<dl>
				<?php if( strlen($this->annotation->comment) > 0 ): ?>
					<dt><?php echo $this->translate("Comment:") ?></dt>
					<dd><?php echo $this->annotation->comment ?></dd>
				<?php else: ?>
					<dt><?php echo $this->translate("Keywords:") ?></dt>
					<dd><?php echo join( ", ", $this->annotation->getKeywords() ) ?></dd>
				<?php endif; ?>
				</dl>
			</div>
		</div>
	</div>
	<div class="buttonBar">
		<a href="<?php echo $this->url( array('action' => 'delete', 'id' => $this->annotation->id ) ); ?>">
			<?php echo $this->translate( "delete annotation" ) ?></a>
		<a href="<?php echo $this->url( array('action' => 'edit', 'id' => $this->annotation->id ) ); ?>">
			<?php echo $this->translate( "modify annotation" ) ?></a>
	</div>
</div>
